1 /** 2 Copyright: Copyright (c) 2018, Joakim Brännström. All rights reserved. 3 License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) 4 Author: Joakim Brännström (joakim.brannstrom@gmx.com) 5 */ 6 module test_clang_tidy_rules; 7 8 import config; 9 10 @("shall successfully run clang-tidy on a c++ file") 11 unittest { 12 // action 13 auto res = executeShell(codeCherckerBin ~ " --vverbose --compile-db " ~ buildPath(testData, 14 "cpp", "empty", compileCommandsFile)); 15 16 // assert 17 writeln(res.output); 18 res.status.shouldEqual(0); 19 } 20 21 @("shall warn about name style in a c++ file") 22 unittest { 23 // action 24 auto res = run([codeCherckerBin, "--vverbose", "--compile-db", 25 buildPath(testData, "cpp", "name_style", compileCommandsFile)]); 26 27 // assert 28 res.print; 29 res.status.shouldNotEqual(0); 30 }